home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / telecomm / fnordadl / fn132src.zoo / ref-man / modem.tex < prev    next >
Encoding:
Text File  |  1991-09-02  |  16.2 KB  |  500 lines

  1. @comment Tell Emacs to use -*-texinfo-*- mode
  2. @comment $Id: modem.tex,v 2.5 91/09/02 01:37:50 adrian Exp $
  3.  
  4. @node Modem Stuff, Events, The Sysop Command Reference, Top
  5. @chapter Modem Stuff
  6. @cindex Modems
  7.  
  8. Modems are finicky beasts, and cajoling them into talking to your
  9. Fnordadel properly can be a tricky piece of business.  This chapter, then,
  10. deals with the various modem configuration options in Fnordadel, and
  11. gives some tips on how to make a recalcitrant modem behave.
  12.  
  13. @node Basic Modem Requirements, Setting Up the Modem, Modem Stuff, Modem Stuff
  14. @section Basic Modem Requirements
  15.  
  16. To run a Fnordadel, you must have a modem possessing a
  17. modicum of basic features.  These are:
  18.  
  19. @itemize @bullet
  20. @item
  21. Must be able to auto-answer the phone.
  22. @item
  23. Must be able to respond to DTR (Data Terminal Ready)
  24. line control by the computer.  DTR is supposed to be
  25. pin 20 on the RS-232 connector.  Ideally, the modem
  26. should be able to hang up the phone, disable auto
  27. answer, and go to `command' mode when the computer flips
  28. DTR off (and reverse the above when DTR goes high).
  29. @item
  30. Must have the CD (Carrier Detect) line tracking the
  31. status of the carrier.  CD (or DCD) is supposed to be
  32. pin 8 on the RS-232 connector.
  33. @item
  34. If you want to do any calling out (i.e., during networking
  35. or whatever), the modem must be able to autodial the
  36. phone using a command string.
  37. @end itemize
  38.  
  39. Most modems are perfectly capable of all of the above.
  40. If your modem is advertised as being ``Hayes-compatible'', then it
  41. @emph{should} work fine.  The DTR and CD settings will likely have to
  42. be adjusted, since most modems do not by default listen to DTR
  43. and most leave the CD line high all the time.  These behaviours
  44. can be changed either by using a DIP-switch or in the software;
  45. it's almost always possible.
  46.  
  47. STadel 3.3b, from which Fnordadel is descended, was
  48. advertised to work with the following list of modems, and there's
  49. no reason to believe that we've introduced any incompatibilities:
  50.  
  51. @itemize @bullet
  52. @item
  53. Avatex 1200, 1200E, 1200HC, 2400HC    
  54. @item
  55. Everex 2400
  56. @item
  57. FastComm 19200
  58. @item
  59. Hayes 1200, 2400
  60. @item
  61. Incomm 2400
  62. @item
  63. MultiTech 1200, 2400
  64. @item
  65. Prometheus 2400B2
  66. @item
  67. Supra 2400
  68. @item
  69. Telebit Trailblazer 19,200
  70. @item
  71. USR Courier 2400, HST 9600
  72. @end itemize
  73.  
  74. @noindent
  75. The Fnordadel developers both use the Supra 2400; we've been
  76. running 24 hours a day for a few years now and have had no problems
  77. with the wee beasties.  Your mileage may vary, of course.
  78.  
  79. @node Setting Up the Modem
  80. @section Setting Up the Modem
  81. @cindex Modem setup
  82. @cindex Setup, modem
  83.  
  84. If your modem meets the above criteria, then we're off.
  85. (If it doesn't, then go buy a real modem---1200 and 2400 baud Hayes
  86. compatible modems are dirt cheap these days.)  In this section we'll
  87. describe some of the @file{ctdlcnfg.sys} options for the modem.
  88.  
  89. @node Baud rate, Initialisation, Setting Up the Modem, Setting Up the Modem
  90. @subsection Baud rate
  91. @cindex Baud rates supported
  92.  
  93. You must tell Fnordadel the highest baud rate
  94. at which the modem will function; this is accomplished by
  95. setting the variable
  96. @vindex sysbaud
  97. @code{#sysbaud} in @file{ctdlcnfg.sys}.
  98. @vindex sysbaud
  99. @code{#sysbaud}
  100. can have any one of the following values:
  101.  
  102. @table @code
  103. @item 0
  104. 300 bps only
  105. @item 1
  106. 300 and 1200 bps
  107. @item 2
  108. 300, 1200 and 2400 bps
  109. @item 3
  110. 300, 1200, 2400 and 9600 bps
  111. @item 4
  112. 300 up to 19200 bps
  113. @end table
  114.  
  115. Note that 4800 bps is not supported.  The ST serial port
  116. will do 4800, but we've never heard of a modem that will,
  117. other than ones that will also go faster.  If for some
  118. reason you find yourself in dire need of 4800, see @ref{Fnordadel Support}.
  119.  
  120. @node Initialisation, Baud-rate detection, Baud rate, Setting Up the Modem
  121. @subsection Initialisation
  122. @cindex Modem setup
  123. @cindex Modem initialisation
  124. @cindex Initialisation, modem
  125.  
  126. Hayes compatible modems, at least, understand
  127. a set of commands to control their behaviour.  Fnordadel
  128. requires that the modem be set up in a certain way; thus,
  129. you must define a command string which will be sent to the
  130. modem every time Fnordadel wants to reset the modem.
  131. Simply put a line like the following:
  132. @vindex modemsetup
  133. @example
  134. #modemsetup "AT &C1 &D2 V0 E0 M0 Q0 X4 S0=1\r%10"
  135. @end example
  136. @noindent
  137. in your @file{ctdlcnfg.sys}.  The example above will work on many
  138. Hayes-compatible modems.  The various parts mean:
  139.  
  140. @itemize @bullet
  141. @item
  142. The initial @samp{AT} tells the modem that a command
  143. string is coming.
  144. @item
  145. @samp{&C1 &D2} sets up the required behaviour for the
  146. CD and DTR lines (@pxref{Basic Modem Requirements}).  If your
  147. modem controls CD and DTR with hardware switches,
  148. it probably will not support these commands, so you may have to
  149. remove them.
  150. @item
  151. @samp{V0 E0 M0 Q0} selects numeric result codes (@pxref{Result codes}),
  152. turns off command echoing, turns
  153. off the built-in speaker, and turns on result codes.
  154. @item
  155. @samp{X4} tells the modem to return the full range of
  156. result codes (@pxref{Result codes}).
  157. @item
  158. @samp{S0=1} tells the modem to answer the phone on the
  159. first ring.
  160. @item
  161. @samp{\r} represents a carriage return, which must be
  162. there to terminate the command string.
  163. @item
  164. And finally, @samp{%10} is a special notation which
  165. causes Fnordadel to pause for 10 tenths of a
  166. second (i.e., one second).  This is necessary for
  167. some modems, which take a comparatively long time
  168. to process the command string.  (See the front of
  169. @file{ctdlcnfg.doc} for more on the format of these sorts
  170. of string variables.)
  171. @end itemize
  172.  
  173. Please be warned that your modem may not recognise
  174. some or all of the above codes; they may be different, or
  175. absent, or whatever.  We've seen some pretty mental modem
  176. behaviour, so be sure to read your modem manual.
  177.  
  178. A trick which has proved useful with many modems
  179. is as follows:  If the modem allows you to save its
  180. settings in non-volatile @sc{ram} (i.e., if the settings can be
  181. preserved when the modem is powered off), then you can use
  182. a terminal program of some kind to manually set up the
  183. modem the way Fnordadel wants it, by sending your version
  184. of the above command string to the modem.  Then use the command
  185. to save settings (usually @samp{AT&W} or something).  At this
  186. point you can simply use @samp{ATZ\r%10} as the
  187. @vindex modemsetup
  188. @code{#modemsetup}
  189. string; @samp{ATZ} has the effect of resetting the modem to the
  190. saved state.  The advantage of this is that the string is
  191. shorter, so it can speed things up a bit, especially during
  192. networking or auto-dialing when the modem is being reset
  193. many times.
  194.  
  195. @node Baud-rate detection, Dialing out, Initialisation, Setting Up the Modem
  196. @subsection Baud-rate detection
  197. @cindex Baud-rate detection
  198.  
  199. Fnordadel must be able to detect the baud rate
  200. of incoming calls, and it has a couple of ways to
  201. accomplish this.  The first is by @code{searchbaud}, and the
  202. second is using result codes.  Result codes are by far the
  203. better method, and since most modems can support the
  204. feature, we recommend it.
  205.  
  206. @node Searchbaud, Result codes, Baud-rate detection, Baud-rate detection
  207. @subsubsection Searchbaud
  208. @cindex Baud rate searching
  209.  
  210. If you define the @file{ctdlcnfg.sys} variable
  211. @vindex searchbaud
  212. @code{#searchbaud} to be @samp{1}, it will cause Fnordadel to
  213. loop through the range of supported baud rates (as
  214. defined by
  215. @vindex sysbaud
  216. @code{#sysbaud}; @pxref{Baud rate}), waiting
  217. one-half second at each rate for a carriage return
  218. (@samp{<CR>}) from the caller.  The upshot of this is that
  219. callers must hit @samp{<CR>} once or twice when they
  220. connect with the @sc{bbs}.
  221.  
  222. @vindex searchbaud
  223. If @code{#searchbaud} is @samp{0}, then your @sc{bbs} will
  224. work at @emph{only} the highest baud rate represented by
  225. @vindex sysbaud
  226. @code{#sysbaud}.  This is last-resort stuff, kids.  You
  227. should normally run with
  228. @vindex searchbaud
  229. @code{#searchbaud} set to @samp{1}
  230. unless your modem absolutely fails to properly
  231. detect other speed connections.  (If your modem is this stupid, it might
  232. be time to consider getting another one.)
  233.  
  234. The variable
  235. @vindex connectprompt
  236. @code{#connectprompt} modifies
  237. the behaviour of
  238. @vindex searchbaud
  239. @code{#searchbaud} slightly; if defined to be @samp{1}, it
  240. causes Fnordadel to loop through the baud rates,
  241. spitting out a prompt which says ``Type return'' and
  242. waiting for a @samp{<CR>} for a while; it does all this
  243. until the user hits @samp{<CR>} at some baud rate, or
  244. until it gives up.
  245.  
  246. Anyway, this is all pretty ugly, really;
  247. a far better method is to use result codes.
  248.  
  249. @node Result codes, 2400-baud operation, Searchbaud, Baud-rate detection
  250. @subsubsection Result codes
  251. @cindex Modem result codes
  252. @cindex Result codes, modem
  253.  
  254. Most modems, Hayes-compatible ones
  255. included, will send a code to the computer when
  256. they pick up a carrier; furthermore, they can
  257. usually be configured to return a different code
  258. depending on the speed of the connection.  We
  259. utilise this to our advantage.
  260.  
  261. There is a @file{ctdlcnfg.sys} variable for each
  262. baud rate that Fnordadel supports
  263. @vindex reply300
  264. (@code{#reply300}
  265. through
  266. @vindex reply19200
  267. @code{#reply19200}) which you should set to
  268. match the string that your modem returns when it
  269. connects at that baud rate.  For example:
  270. @vindex reply300
  271. @vindex reply1200
  272. @vindex reply2400
  273. @example
  274. #reply300 "1"
  275. #reply1200 "5"
  276. #reply2400 "10"
  277. @end example
  278. @noindent
  279. are the usual settings for a Hayes-compatible
  280. 2400-baud modem.  (As always, your mileage may
  281. vary.)
  282.  
  283. Please note that the defined reply strings
  284. must be sent (by the modem) terminated with a
  285. carriage return; however, don't put @samp{\r} in the
  286. @code{#reply} strings.  (i.e., if the 300 baud reply sent from the modem is
  287. @samp{1\r}, use
  288. @vindex reply300
  289. @samp{#reply300 "1"}.)
  290.  
  291. If you've got the @code{#reply} strings defined
  292. in @file{ctdlcnfg.sys}, then Fnordadel will use the
  293. result code method instead of the searchbaud
  294. stuff.  You must have a @code{#reply} string for each
  295. permissible baud rate (i.e., if you defined
  296. @samp{sysbaud 1}, then you need a
  297. @vindex reply300
  298. @code{#reply300} and a
  299. @vindex reply1200
  300. @code{#reply1200} defined before Fnordadel will use
  301. the result code method.)
  302.  
  303. Note also that you must have the modem
  304. set up to return the codes properly.  @xref{Initialisation}.
  305.  
  306. @node 2400-baud operation, Connect delay, Result codes, Baud-rate detection
  307. @subsubsection 2400-baud operation
  308.  
  309. Many 2400-baud modems have a slight quirk.
  310. They will not connect with a 2400 baud caller
  311. unless they have been initialised with the serial
  312. port set at 2400 baud; they will, however, connect
  313. with any lower baud rate no matter what speed
  314. they're initialised at.  We don't know why this
  315. is; but if your modem is like this, there's a
  316. @file{ctdlcnfg.sys} parameter (well, two, actually) which
  317. will help.
  318.  
  319. Simply define the variable
  320. @vindex init-speed
  321. @code{#init-speed} to
  322. be the baud rate at which the modem should be
  323. initialised; the permissible values are the same
  324. as for
  325. @vindex sysbaud
  326. @code{#sysbaud} (@pxref{Baud rate}).  In the case
  327. of the quirky 2400 baud modems, put @samp{init-speed 2}
  328. and the problem will go away.
  329.  
  330. Another way of fixing it is to define
  331. @vindex hs-bug
  332. @code{#hs-bug} to be @samp{1}.  This causes Fnordadel to initialise
  333. the modem at the highest supported baud rate,
  334. which is specified by
  335. @vindex sysbaud
  336. @code{#sysbaud}.  Either method
  337. works.
  338.  
  339. @node Connect delay,  , 2400-baud operation, Baud-rate detection
  340. @subsubsection Connect delay
  341.  
  342. Some modems, we understand, will croak if
  343. a character is sent to them too quickly after they
  344. connect with an incoming caller.  This could
  345. happen if you've got both @code{searchbaud} and
  346. @code{connectprompt} set.  If it does happen, then
  347. set @code{connectdelay} to be the number of seconds
  348. to wait after carrier is first detected, before
  349. sending anything.
  350.  
  351. @node Dialing out,  , Baud-rate detection, Setting Up the Modem
  352. @subsection Dialing out
  353. @cindex Dialing out
  354. @cindex Modem setup, dialing out
  355.  
  356. If you want to do any networking, or if you just
  357. want to use your Fnordadel as a terminal program, then
  358. you have to tell it some stuff about how to make your
  359. modem dial the phone.
  360.  
  361. @node The dialing commands, Long-distance dialing, Dialing out, Dialing out
  362. @subsubsection The dialing commands
  363. @cindex Modem dialing prefix
  364. @cindex Modem dialing suffix
  365.  
  366. The relevant @file{ctdlcnfg.sys} variables are
  367. @vindex calloutprefix
  368. @code{#calloutprefix} and
  369. @vindex calloutsuffix
  370. @code{#calloutsuffix}.  As you'd
  371. expect, they should be defined as the strings used
  372. to start and end a dialing command.  The string
  373. sent to the modem will consist of:
  374. @example
  375. <@var{calloutprefix}><@var{number}><@var{calloutsuffix}>
  376. @end example
  377. @noindent
  378. For Hayes-compatible modems, the following
  379. settings work:
  380. @vindex calloutprefix
  381. @vindex calloutsuffix
  382. @example
  383. #calloutprefix "ATD"
  384. #calloutsuffix "\r"
  385. @end example
  386. An optional @samp{T} or @samp{P} may be put after @samp{ATD} to
  387. specify Touch-Tone or Pulse (rotary) dialing.
  388. If your modem is not standard Hayes, then look it
  389. up in the manual.
  390.  
  391. @node Long-distance dialing, Timing, The dialing commands, Dialing out
  392. @subsubsection Long-distance dialing
  393. @cindex Dialing, long-distance
  394. @cindex Modem setup, long-distance dialing
  395.  
  396. If the variable
  397. @vindex usa
  398. @code{#usa} is defined to be
  399. @samp{1}, then Fnordadel assumes it is in North
  400. America and will form the dial string for a
  401. long-distance number as follows:
  402. @example
  403. <@code{calloutprefix}>1<@var{area code}><@var{number}><@code{calloutsuffix}>
  404. @end example
  405. @vindex usa
  406. If @code{#usa} is @samp{0}, Fnordadel will simply
  407. spit the number out as-is.
  408.  
  409. @node Timing, A speed-up, Long-distance dialing, Dialing out
  410. @subsubsection Timing
  411.  
  412. Two more @file{ctdlcnfg.sys} variables are used
  413. to tell Fnordadel how long to wait for a
  414. connection when dialing out.  The two variables are
  415. @vindex local-time
  416. @code{#local-time} and
  417. @vindex ld-time
  418. @code{#ld-time}; they default to
  419. 25 seconds and 50 seconds respectively.  (The time
  420. used for long-distance (``ld'') dialing is longer
  421. because of delays in the phone system.)
  422.  
  423. @node A speed-up,  , Timing, Dialing out
  424. @subsubsection A speed-up
  425.  
  426. If you define the variable
  427. @vindex hayes
  428. @code{#hayes} to be
  429. @samp{1}, then Fnordadel will blithely assume that
  430. the modem returns @samp{3} for @samp{NO CARRIER} and @samp{7} for
  431. @samp{BUSY} when it's dialing out.  This is a useful
  432. kludge to speed up dialing out; otherwise, you've
  433. got to wait for the defined amount of time (@pxref{Timing})
  434. to pass before Fnordadel will realise that the call is not going to be
  435. successful.
  436.  
  437. Please note that defining
  438. @vindex hayes
  439. @code{#hayes} has no
  440. other effect; it will not cause Fnordadel to
  441. assume anything else about the nature of your
  442. modem.
  443.  
  444. @node High-Speed Modems
  445. @section High-Speed Modems
  446. @cindex High-speed modems
  447. @cindex Port locking
  448.  
  449. Getting high-speed modems (9600 bps and up) to work with your system
  450. isn't quite as straight forward as with lower-speed units.  For one
  451. thing, if you're using @sc{tos} 1.4 or higher, there is a glitch that
  452. prevents hardware (@sc{rts}/@sc{cts}) flow control from working.  To fix
  453. the problem, you need to install @code{tos14fx2.prg} in your AUTO folder.
  454. @xref{Things to Make Fnordadel Work or Work Better}.
  455.  
  456. For another thing, high-speed modems are typically able to talk to your
  457. Atari at a fixed speed (usually 19,200 bps), and handle the online user's
  458. varying connect speed themselves.  To make this work properly, you don't
  459. want your Fnordadel to try altering the serial port speed; instead, you
  460. want it locked at a fixed setting.  This is done by setting
  461. @vindex sysbaud
  462. @code{#sysbaud} to the speed at which you wish the system locked,
  463. @vindex searchbaud
  464. @code{#searchbaud} to @samp{0}, and all the result code strings to the
  465. null string, "".  @xref{Searchbaud}, and @ref{Result codes}.
  466.  
  467. Two side-effects of port locking are that file transfer time estimates will
  468. be out of whack, and the @file{calllog.sys} file will show all users
  469. connected at the locked speed.  These problems will be fixed some day.
  470.  
  471. @node Common Modem Problems
  472. @section Common Modem Problems
  473.  
  474. @itemize @bullet
  475. @item
  476. @i{"The modem won't work properly at 2400 baud! Help!"}
  477.  
  478. @xref{2400-baud operation}.
  479.  
  480. @item
  481. @i{"What happens if I turn the modem off while someone is online?"}
  482.  
  483. Nothing bad.  Because you've got the
  484. @vindex modemsetup
  485. @code{#modemsetup}
  486. string defined (you @emph{have} got it defined, right?
  487. If not, @pxref{Initialisation}), the @sc{bbs} will simply
  488. detect the loss of carrier and immediately
  489. reinitialise the modem properly for the next
  490. caller, logging the previous caller off.
  491.  
  492. @item
  493. @i{"My Blistering-Speed-of-Deth 153,600 baud modem won't work
  494. right with Fnordadel!  Help!"}
  495.  
  496. Please send us two of the modems in question, and
  497. we promise to have Fnordadel working flawlessly
  498. with them right away!
  499. @end itemize
  500.